package com.fang.bank2;

public class Client extends  Thread {
    private int want;
    private Bank bk;

    public Client(String name, int want, Bank bk) {
        super(name);
        this.want = want;
        this.bk = bk;
    }

    @Override
    public void run() {
        int money = 0;
        while((money=bk.getAccount(want))>0){
            System.out.println("取钱成功");
        }
    }
}
